const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const materializedPlugin = require('mongoose-materialized');

// 定义一个普通的数据模型
var CateSchema = new Schema({
    type:Number,  //1、新闻分类  2、上传分类  3、评论分类
    title:{type:String}
});

// 将数据模型应用插件
CateSchema.plugin(materializedPlugin);

module.exports = mongoose.model('Cate', CateSchema,'cate');